const state = {
  bringForwardInfo: {
    bringForwardInput: {
      transferMoney: '', // 转账金额
      getManName: '', // 收款人姓名
      getCardNo: '', // 收款人账号
      getBank: '', // 收款银行
      getNetPoint: '', // 收款网点
      tranMode: '', // 到账模式
      msg: '', // 附言
      cardNo: '', // 转出卡号
      routeFlag: '' // 转账模式
    }
  },
  eAccountInfo: {
    cardLists: [
      {
        acctNo: '6229330496000066274', // 绑定账号
        bindCard: '621790909090888', // 绑定卡号
        bankName: '中国银行' // 发证机构
      }
    ],
    ActType: '', // 开户类型(二类户/三类户)
    hongxin: '',
    photoReturn: {
      fonts: '',
      after: ''
    }
  }
}

const getters = {
  getBringForwardInfo (state) {
    return state.bringForwardInfo.bringForwardInput
  },
  getEAccountInfo (state) {
    return state.eAccountInfo.cardLists
  },
  getEAccountInfoType (state) {
    return state.eAccountInfo.ActType
  },
  getHongxin (state) {
    return state.eAccountInfo.hongxin
  },
  getIdPhoto (state) {
    return state.eAccountInfo.photoReturn
  }
}

const actions = {

}

const mutations = {
  setBringForwardInfo (state, obj) {
    for (let key in obj) {
      state.bringForwardInfo.bringForwardInput[key] = obj[key]
    }
  },
  addEAccountInfo (state, obj) {
    state.eAccountInfo.cardLists.push(obj)
  },
  changeType (state, obj) {
    state.eAccountInfo.ActType = obj
  },
  changeHongxin (state, obj) {
    state.eAccountInfo.hongxin = obj
  },
  setPhotoReturn (state, obj) {
    state.eAccountInfo.photoReturn = obj
  }
}

export default {
  state,
  getters,
  actions,
  mutations
}
